{include file="layout/layout" /}
<script type="text/javascript" charset="utf-8" src="__ROOT__public/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__ROOT__public/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="__ROOT__public/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/laydate/dist/laydate.js"></script>
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
            <div class="subject">
                <h3>广告管理</h3>
                <h5>添加默认广告</h5>
            </div>
            <ul class="tab-base nc-row">
                <li><a href="?label=1" {if input('get.label')==1}class="current"{/if}><span>头部轮播</span></a></li>
                <li><a href="?label=2" {if input('get.label')==2}class="current"{/if}><span>文字广告</span></a></li>
                <li><a href="?label=3" {if input('get.label')==3}class="current"{/if}><span>底部图片</span></a></li>
            </ul>
        </div>
    </div>
    <form class="form-horizontal" id="roleform" enctype="multipart/form-data" action="?act=a" method="post">
        <input type="hidden" name='ad_label' value="{:input('param.label')}">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label>广告位置</label>
                </dt>
                <dd class="opt">
                    <label for="gender1">{$wz_name}</label>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>广告描述</label>
                </dt>
                <dd class="opt">
                    <input class="input-txt" datatype="*" nullmsg="广告描述不能为空" name="ad_desc" type="text">
                </dd>
            </dl>
        {if stristr('1,3',input('param.label'))}
            <dl class="row">
                <dt class="tit">
                    <label>上传广告图</label>
                </dt>
                <dd class="opt">
                    <input class="input-txt" datatype="*" nullmsg="广告图必须上传" name="image[]" type="file">
                    {if input('param.label')==1}
                        <input type='file' name='image[]'>
                        <input type='file' name='image[]'>
                    {/if}
                </dd>
            </dl>
        {else/}
            <dl class="row">
                <dt class="tit">
                    <label>编辑广告内容</label>
                </dt>
                <dd class="opt">
                    <textarea id="role_desc" name="ad_content" datatype="*" errormsg="广告内容不能为空" class="tarea" rows="6" maxlength="50"></textarea>
                    <p class="notic">不可超过50字</p>
                </dd>
            </dl>
        {/if}
            <div class="bot"><button id="button" style="width:96px;height:35px;background: #4FC0E8;border-radius:5px;line-height:35px;text-align: center;color:#fff;border: 0;font-size: 15px;">确认提交</button></div>
        
        </div>
    </form>
</div>
<script>
    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });
        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });
    });

</script>

</body></html>